#{extends 'master.html' /}
#{set 'title'}
DigitalBand.ru - &{'Product.categoryList.title'}
#{/set}
#{set isCatalogActive:'active' /}
#{set 'moreStyles'}
<link type="text/css" rel="stylesheet" href="@{'/public/javascripts/plugins/accordion/style.css'}"/>
#{/set}
#{set 'moreScripts'}

<script type="text/javascript" src="@{'/public/javascripts/plugins/accordion/menu.js'}"/>
<script type="text/javascript">

</script>
#{/set}
<noscript>
    <style type="text/css">
        .subcategory {
            display: block;
        }
    </style>
</noscript>
<div class="stacked-box">
    <ul id="menu" class="accordion">

        #{list items:categoryRoot.categories, as:'category'}
        <li class="category_list current">

            <a href="#">
                ${category.title} (${category.productCount})</a>


            <ul class="subcategory">
                #{list items:category.categories, as:'subcategory' }
                #{if subcategory.productCount > 0}
                <li>
                    <a href="@{Product.list(subcategory.id)}">${subcategory.title}
                        (${subcategory.productCount})</a>
                </li>
                #{/if}
                #{/list}
            </ul>

        </li>
        #{/list}
    </ul>
</div>